Skip to content

Add Bomberland arena#105

Open
Muhtasham wants to merge 1 commit intoCodeClash-ai:mainfrom
Muhtasham:feat/bomberland-arena
Open

Add Bomberland arena#105
Muhtasham wants to merge 1 commit intoCodeClash-ai:mainfrom
Muhtasham:feat/bomberland-arena

Conversation

@Muhtasham
Copy link
Copy Markdown
Contributor

@Muhtasham Muhtasham commented May 5, 2026

Summary

Adds a Bomberland arena to CodeClash as a separate game adapter.

Bomberland is a Bomberman-style multi-agent grid arena based on Coder One's Bomberland competition. Players submit bomberland_agent.py with next_actions(game_state), controlling multiple units that move, place bombs, destroy blocks, damage opponents, and score across deterministic seeded simulations.

What changed

  • Added BomberlandArena and registered it in the arena registry.
  • Added a codeclash/bomberland Docker image that pins the upstream CoderOneHQ/bomberland repo for provenance at /opt/bomberland.
  • Added a compact CodeClash-native Python runtime instead of requiring the upstream TypeScript websocket/docker-compose stack inside the arena container.
  • Added a starter bomberland_agent.py, runtime README, public docs page, and dummy smoke config.
  • Added unit coverage for validation, result parsing, command construction, registration, runtime timeouts, sibling imports, malformed actions, and config constraints.

Runtime contract

  • Exactly two players per tournament.
  • sims_per_round must be even so both players receive paired starting sides.
  • validation_timeout bounds validation-time import/probe execution.
  • agent_timeout bounds each runtime agent call in a child process, so hanging submitted code is scored as an agent error instead of hanging the round.
  • Result files use average_scores, total_scores, sims, and per-simulation details JSON strings.

Notes

  • Issue Add Pommerman as a game #8 tracks Pommerman. This PR adds Bomberland, which is related in game style but is not the same project, so it intentionally does not close Add Pommerman as a game #8.
  • The runtime keeps the submission interface close to the upstream starter-kit shape where practical: connection.agent_id, agents[player].unit_ids, unit_state, entities, world, and tick.

Verification

  • uv run ruff check codeclash/arenas/bomberland tests/arenas/test_bomberland.py codeclash/arenas/__init__.py
  • uv run pytest tests/arenas/test_bomberland.py
  • uv run python codeclash/arenas/bomberland/runtime/run_bomberland.py --sims 2 --ticks 40 --width 11 --height 11 --unit-count 3 --agent-timeout 0.25 --output /tmp/.../results.json --agent alpha=/tmp/.../alpha/bomberland_agent.py --agent beta=/tmp/.../beta/bomberland_agent.py
  • docker image rm codeclash/bomberland >/dev/null 2>&1 || true; uv run python main.py configs/examples/Bomberland__dummy__r1__s2.yaml -o /tmp/codeclash-bomberland-smoke-1777983276
  • uv run pytest tests/arenas
  • uv run mkdocs build
  • uv run pre-commit run --all-files
  • uv run pytest

@Muhtasham Muhtasham force-pushed the feat/bomberland-arena branch from 47708a4 to 4e12494 Compare May 5, 2026 12:04
@Muhtasham Muhtasham force-pushed the feat/bomberland-arena branch from 4e12494 to 9a53f59 Compare May 5, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Pommerman as a game

1 participant